home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / AIncludes / ATSUnicode.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  35.9 KB  |  1,003 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ATSUnicode.a
  3. ;
  4. ;    Contains:    Public interfaces for Apple Type Services for Unicode Imaging
  5. ;
  6. ;    Version:    Technology:    Allegro
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1997-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__ATSUNICODE__') = 'UNDEFINED' THEN
  18. __ATSUNICODE__ SET 1
  19.  
  20.     IF &TYPE('__ATSLAYOUTTYPES__') = 'UNDEFINED' THEN
  21.     include 'ATSLayoutTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__SFNTLAYOUTTYPES__') = 'UNDEFINED' THEN
  24.     include 'SFNTLayoutTypes.a'
  25.     ENDIF
  26.  
  27.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  28.     include 'MacTypes.a'
  29.     ENDIF
  30.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  31.     include 'Quickdraw.a'
  32.     ENDIF
  33.     IF &TYPE('__TEXTCOMMON__') = 'UNDEFINED' THEN
  34.     include 'TextCommon.a'
  35.     ENDIF
  36.  
  37. ; ***********
  38. ;     Types    
  39. ; ***********
  40. ; typedef UniCharArrayPtr *                UniCharArrayHandle
  41.  
  42.  
  43. ;      UniCharArrayHandle is a handle type to correspond to 
  44. ;      UniCharArrayPtr, defined in Unicode.h.  It refers 
  45. ;      to a handle, interpreted as a pointer to an array 
  46. ;      of UniChar's (UInt16's).
  47.  
  48.  
  49. ; typedef UInt32                         UniCharArrayOffset
  50.  
  51.  
  52. ;      UniCharArrayOffset is used to indicate an offset 
  53. ;      into an array of UniChar's (UInt16's).  
  54.  
  55.  
  56. ; typedef Fixed                         ATSUTextMeasurement
  57.  
  58.  
  59. ;      ATSUTextMeasurement is exactly what its name implies:  
  60. ;      a measurement of the size in some direction of text:  
  61. ;      height, width, ascent, descent, and so on.  
  62.  
  63.  
  64. ; typedef UInt32                         ATSUFontID
  65.  
  66.  
  67. ;      ATSUFontID indicates a particular font family and face.  
  68. ;      ATSUFontID's are not guaranteed to remain constant across 
  69. ;      reboots.  Clients should use the font's unique name to 
  70. ;      get a font token to store in documents which is 
  71. ;      guaranteed to remain constant across reboots. 
  72.  
  73.  
  74. ; typedef UInt16                         ATSUFontFeatureType
  75.  
  76. ; typedef UInt16                         ATSUFontFeatureSelector
  77.  
  78.  
  79. ;      ATSUFontFeatureType and ATSUFontFeatureSelector are used 
  80. ;      to identify font features.  
  81.  
  82.  
  83. ; typedef FourCharCode                     ATSUFontVariationAxis
  84.  
  85. ; typedef Fixed                         ATSUFontVariationValue
  86.  
  87.  
  88. ;      ATSUFontVariationAxis and ATSUFontVariationValue are used 
  89. ;      in connection with font variations.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95. ;      ATSUTextLayout is used to store the attribute information 
  96. ;      associated with a contiguous block of UniChar's (UInt16's) 
  97. ;      in memory.  It's typed to be an opaque structure.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103. ;      ATSUStyle is used to store a set of individual attributes, 
  104. ;      font features, and font variations.  It's typed to be 
  105. ;      an opaque structure.  
  106.  
  107.  
  108. ; typedef UInt32                         ATSUAttributeTag
  109.  
  110.  
  111. ;      ATSUAttributeTag is used to indicate the particular type 
  112. ;      of attribute under consideration:  font, size, color, 
  113. ;      and so on.  
  114. ;      Each style run may have at most one attribute with a 
  115. ;      given ATSUAttributeTag (i.e., a style run can't have 
  116. ;      more than one font or size) but may have none.  
  117.  
  118.  
  119. ; typedef void *                        ATSUAttributeValuePtr
  120.  
  121.  
  122. ;      ATSUAttributeValuePtr is used to provide generic access 
  123. ;      to storage of attribute values, which vary in size.
  124.  
  125.  
  126. ATSUAttributeInfo        RECORD 0
  127. fTag                     ds.l    1                ; offset: $0 (0)
  128. fValueSize                 ds.l    1                ; offset: $4 (4)
  129. sizeof                     EQU *                    ; size:   $8 (8)
  130.                         ENDR
  131.  
  132. ;      ATSUAttributeInfo is used to provide a tag/size pairing.  
  133. ;      This makes it possible to provide the client information   
  134. ;      about all the attributes for a given range of text.  This   
  135. ;      structure is only used to return to the client information   
  136. ;      about a complete set of attributes.  An array of   
  137. ;      ATSUAttributeInfos is passed as a parameter so that the   
  138. ;      client can find out what attributes are set and what their   
  139. ;      individual sizes are; with that information, they can then   
  140. ;      query about the values of the attributes they're interested   
  141. ;      in.  Because arrays of ATSUAttributeInfos are used as parameters   
  142. ;      to functions, they have to be of a fixed size, hence the   
  143. ;      value is not included in the structure.  
  144.  
  145.  
  146. ATSUCaret                RECORD 0
  147. fX                         ds.l    1                ; offset: $0 (0)
  148. fY                         ds.l    1                ; offset: $4 (4)
  149. fDeltaX                     ds.l    1                ; offset: $8 (8)
  150. fDeltaY                     ds.l    1                ; offset: $C (12)
  151. sizeof                     EQU *                    ; size:   $10 (16)
  152.                         ENDR
  153.  
  154. ;      ATSUCaret contains the complete information needed to render a
  155. ;      caret.  fX and fY is the position of one of the caret's ends
  156. ;      relative to the origin position of the line the caret belongs.
  157. ;      fDeltaX and fDeltaY is the position of the caret's other end.
  158. ;      Hence, to draw a caret, simply call MoveTo(fX, fY) followed by
  159. ;      LineTo(fDeltaX, fDeltaY) or equivalent.  The ATSUCaret will
  160. ;      contain the positions needed to draw carets on angled lines
  161. ;      and reflect angled carets and leading/trailing split caret
  162. ;      appearances.
  163.  
  164.  
  165. ; typedef int                             ATSUCursorMovementType
  166.  
  167.  
  168. ;      ATSUCursorMovementType currently can take three values 
  169. ;      (kATSUByCharacter, kATSUByCluster, and kATSUByWord) 
  170. ;      and is used to indicate how much to move the cursor.  
  171.  
  172.  
  173. ; typedef UInt16                         ATSUVerticalCharacterType
  174.  
  175.  
  176. ;      ATSUVerticalCharacterType currently can take two values 
  177. ;      (kATSUStronglyVertical, and kATSUStronglyHorizontal) and 
  178. ;      is used to indicate whether text is to be laid out as 
  179. ;      vertical glyphs or horizontal glyphs.  
  180.  
  181.  
  182. ; typedef UInt16                         ATSUStyleComparison
  183.  
  184.  
  185. ;      ATSUStyleComparison is an enumeration with four values 
  186. ;      (kATUStyleUnequal, ATSUStyleContains, kATSUStyleEquals, 
  187. ;      and kATSUStyleContainedBy), and is used by ATSUCompareStyles() 
  188. ;      to indicate if the first style parameter contains as a 
  189. ;      proper subset, is equal to, or is contained by the second 
  190. ;      style parameter.
  191.  
  192.  
  193. ; ***************************************************
  194. ;     Gestalt selectors                                
  195. ;         Move into Gestalt.i when they're stable!!!!    
  196. ; ***************************************************
  197.  
  198. gestaltATSUVersion                EQU        'uisv'
  199. gestaltATSUFeatures                EQU        'uisf'
  200.  
  201. gestaltOriginalATSUVersion        EQU        $00010000
  202. ; ***************
  203. ;     Error codes    
  204. ; ***************
  205.  
  206. kATSUInvalidTextLayoutErr        EQU        -8790                ;    An attempt was made to use a ATSUTextLayout 
  207.                                                             ;    which hadn't been initialized or is otherwise 
  208.                                                             ;    in an invalid state. 
  209. kATSUInvalidStyleErr            EQU        -8791                ;    An attempt was made to use a ATSUStyle which  
  210.                                                             ;    hadn't been properly allocated or is otherwise  
  211.                                                             ;    in an invalid state.  
  212. kATSUInvalidTextRangeErr        EQU        -8792                ;    An attempt was made to extract information   
  213.                                                             ;    information from or perform an operation on a   
  214.                                                             ;    ATSUTextLayout for a range of text not covered   
  215.                                                             ;    by the ATSUTextLayout.  
  216. kATSUFontsMatched                EQU        -8793                ;    This is not an error code but is returned by    
  217.                                                             ;    ATSUMatchFontsToText() when changes need to    
  218.                                                             ;    be made to the fonts associated with the text.  
  219. kATSUFontsNotMatched            EQU        -8794                ;    This value is returned by ATSUMatchFontsToText()    
  220.                                                             ;    when the text contains Unicode characters which    
  221.                                                             ;    cannot be represented by any installed font.  
  222. kATSUNoCorrespondingFontErr        EQU        -8795                ;    This value is retrned by font ID conversion 
  223.                                                             ;    routines ATSUFONDtoFontID() and ATSUFontIDtoFOND() 
  224.                                                             ;    to indicate that the input font ID is valid but 
  225.                                                             ;    there is no conversion possible.  For example, 
  226.                                                             ;    data-fork fonts can only be used with ATSUI not 
  227.                                                             ;    the FontManager, and so converting an ATSUIFontID 
  228.                                                             ;    for such a font will fail.   
  229. kATSUInvalidFontErr                EQU        -8796                ;    Used when an attempt was made to use an invalid font ID.
  230. kATSUInvalidAttributeValueErr    EQU        -8797                ;    Used when an attempt was made to use an attribute with 
  231.                                                             ;    a bad or undefined value.  
  232. kATSUInvalidAttributeSizeErr    EQU        -8798                ;    Used when an attempt was made to use an attribute with a 
  233.                                                             ;    bad size.  
  234. kATSUInvalidAttributeTagErr        EQU        -8799                ;    Used when an attempt was made to use a tag value that
  235.                                                             ;    was not appropriate for the function call it was used.  
  236. kATSUInvalidCacheErr            EQU        -8800                ;    Used when an attempt was made to read in style data 
  237.                                                             ;    from an invalid cache.  Either the format of the 
  238.                                                             ;    cached data doesn't match that used by Apple Type 
  239.                                                             ;    Services for Unicode™ Imaging, or the cached data 
  240.                                                             ;    is corrupt.  
  241. kATSUNotSetErr                    EQU        -8801                ;    Used when the client attempts to retrieve an attribute, 
  242.                                                             ;    font feature, or font variation from a style when it 
  243.                                                             ;    hadn't been set.  In such a case, the default value will
  244.                                                             ;    be returned for the attribute's value.
  245. kATSUNoStyleRunsAssignedErr        EQU        -8802                ;    Used when an attempt was made to measure, highlight or draw
  246.                                                             ;    a ATSUTextLayout object that has no styleRuns associated with it.
  247.                                                             ;    Used when QuickDraw Text encounters an error rendering or measuring
  248. kATSUQuickDrawTextErr            EQU        -8803                ;    a line of ATSUI text.
  249. ; ******************************************************************************
  250. ;     ATSUI Attribute tags:  Apple reserves values 0 to 65,535 (0 to 0x0000FFFF) 
  251. ;     ATSUI clients may create their own tags with any other value               
  252. ; ******************************************************************************
  253. ;     Line Control Attribute Tags 
  254.  
  255. kATSULineWidthTag                EQU        1                    ;    Type:            ATSUTextMeasurement
  256.                                                             ;    Default value:    0
  257. kATSULineRotationTag            EQU        2                    ;    Type:            Fixed (fixed value in degrees in right-handed coordinate system)
  258.                                                             ;    Default value:    0
  259. kATSULineDirectionTag            EQU        3                    ;    Type:            Boolean; values 0 or 1 (see below for value identities)
  260.                                                             ;    Default value:    kATSULeftToRightBaseDirection
  261. kATSULineJustificationFactorTag    EQU        4                    ;    Type:            Fract between 0 and 1
  262.                                                             ;    Default value:    kATSUNoJustification
  263. kATSULineFlushFactorTag            EQU        5                    ;    Type:            Fract between 0 and 1 
  264.                                                             ;    Default value:    kATSUStartAlignment
  265. kATSULineBaselineValuesTag        EQU        6                    ;    Type:            BslnBaselineRecord
  266.                                                             ;    Default value:    All zeros.  Calculated from other style attributes (e.g., font and point size)
  267.                                                             ;    Type:            UInt32
  268. kATSULineLayoutOptionsTag        EQU        7                    ;    Default value:    kATSUNoLayoutOptions - other options listed in ATSLayoutTypes.h
  269. ;     Run Style Attribute Tags 
  270.  
  271.                                                             ; QuickDraw compatibility tags 
  272. kATSUQDBoldfaceTag                EQU        256                    ;    Type:            Boolean    
  273.                                                             ;    Default value:    false
  274. kATSUQDItalicTag                EQU        257                    ;    Type:            Boolean        
  275.                                                             ;    Default value:    false
  276. kATSUQDUnderlineTag                EQU        258                    ;    Type:            Boolean    
  277.                                                             ;    Default value:    false
  278. kATSUQDCondensedTag                EQU        259                    ;    Type:            Boolean    
  279.                                                             ;    Default value:    false
  280. kATSUQDExtendedTag                EQU        260                    ;    Type:            Boolean    
  281.                                                             ;    Default value:    false
  282.                                                             ; Common run tags 
  283. kATSUFontTag                    EQU        261                    ;    Type:            ATSUFontID    
  284.                                                             ;    Default value:    GetScriptVariable( smSystemScript, smScriptAppFond )
  285. kATSUSizeTag                    EQU        262                    ;    Type:            Fixed    
  286.                                                             ;    Default value:    GetScriptVariable( smSystemScript, smScriptAppFondSize )    
  287. kATSUColorTag                    EQU        263                    ;    Type:            RGBColor    
  288.                                                             ;    Default value:    (0, 0, 0)
  289. kATSULanguageTag                EQU        264                    ;    Type:            RegionCode    
  290.                                                             ;    Default value:    GetScriptVariable( smSystemScript, smScriptLang )
  291.                                                             ;    Less common run tags 
  292. kATSUVerticalCharacterTag        EQU        265                    ;    Type:            ATSUVerticalCharacterType    
  293.                                                             ;    Default value:    kATSUStronglyHorizontal
  294. kATSUImposeWidthTag                EQU        266                    ;    Type:            ATSUTextMeasurement
  295.                                                             ;    Default value:    all glyphs use their own font defined advance widths
  296. kATSUBeforeWithStreamShiftTag    EQU        267                    ;    Type:            Fixed
  297.                                                             ;    Default value:    0
  298. kATSUAfterWithStreamShiftTag    EQU        268                    ;    Type:            Fixed
  299.                                                             ;    Default value:    0
  300. kATSUCrossStreamShiftTag        EQU        269                    ;    Type:            Fixed
  301.                                                             ;    Default value:    0
  302. kATSUTrackingTag                EQU        270                    ;    Type:            Fixed
  303.                                                             ;    Default value:    0
  304. kATSUHangingInhibitFactorTag    EQU        271                    ;    Type:            Fract between 0 and 1
  305.                                                             ;    Default value:    0
  306. kATSUKerningInhibitFactorTag    EQU        272                    ;    Type:            Fract between 0 and 1
  307.                                                             ;    Default value:    0
  308. kATSUDecompositionFactorTag        EQU        273                    ;    Type:            Fixed (-1.0 -> 1.0)
  309.                                                             ;    Default value:    0
  310. kATSUBaselineClassTag            EQU        274                    ;    Type:            BslnBaselineClass  (see SFNTLayoutTypes.h)
  311.                                                             ;    Default value:    kBSLNNoBaselineOverride
  312. kATSUPriorityJustOverrideTag    EQU        275                    ;    Type:            ATSJustPriorityWidthDeltaOverrides (see ATSLayoutTypes.h)
  313.                                                             ;    Default value:    all zeros
  314. kATSUNoLigatureSplitTag            EQU        276                    ;    Type:            Boolean
  315.                                                             ;    Default value:    false - ligatures and compound characters have divisable components.
  316. kATSUNoCaretAngleTag            EQU        277                    ;    Type:            Boolean
  317.                                                             ;    Default value:    false - use the character's angularity to determine its boundaries
  318. kATSUSuppressCrossKerningTag    EQU        278                    ;    Type:            Boolean
  319.                                                             ;    Default value:    false - do not suppress automatic cross kerning (defined by font)
  320. kATSUNoOpticalAlignmentTag        EQU        279                    ;    Type:            Boolean
  321.                                                             ;    Default value:    false - do not suppress character's automatic optical positional alignment
  322. kATSUForceHangingTag            EQU        280                    ;    Type:            Boolean
  323.                                                             ;    Default value:    false - do not force the character's to hang beyond the line boundaries
  324. kATSUNoSpecialJustificationTag    EQU        281                    ;    Type:            Boolean
  325.                                                             ;    Default value:    false - perform post-compensation justification if needed
  326. kATSUMaxATSUITagValue            EQU        65535                ;    This is the maximum Apple ATSUI reserved tag value.  Client defined tags must be larger.
  327. ; *******************************
  328. ;     Enumerations and constants    
  329. ; *******************************
  330. ;  Cursor movement 
  331.  
  332. kATSUByCharacter                EQU        0
  333. kATSUByCluster                    EQU        1
  334. kATSUByWord                        EQU        2
  335. ;  Vertical text types 
  336.  
  337. kATSUStronglyHorizontal            EQU        0
  338. kATSUStronglyVertical            EQU        1
  339. ;  Line direction types (used for kATSULineDirectionTag values) 
  340.  
  341. kATSULeftToRightBaseDirection    EQU        0                    ;    Impose left-to-right or top-to-bottom dominant direction 
  342. kATSURightToLeftBaseDirection    EQU        1                    ;    Impose right-to-left or bottom-to-top dominant direction 
  343. ;  Style comparison types 
  344.  
  345. kATSUStyleUnequal                EQU        0
  346. kATSUStyleContains                EQU        1
  347. kATSUStyleEquals                EQU        2
  348. kATSUStyleContainedBy            EQU        3
  349. ;  LineFlushFactor convenience defined values 
  350.  
  351. kATSUStartAlignment                EQU        $00000000
  352. kATSUEndAlignment                EQU        $40000000
  353. kATSUCenterAlignment            EQU        $20000000
  354. ;  LineJustificationFactor convenience defined values 
  355.  
  356. kATSUNoJustification            EQU        $00000000
  357. kATSUFullJustification            EQU        $40000000
  358. ;  Other constants    
  359.  
  360. kATSUInvalidFontID                EQU        0
  361.  
  362.  
  363. kATSUUseLineControlWidth        EQU        $7FFFFFFF
  364.  
  365.  
  366. kATSUUseGrafPortPenLoc            EQU        $FFFFFFFF
  367. kATSUClearAll                    EQU        $FFFFFFFF
  368.  
  369.  
  370. kATSUFromTextBeginning            EQU        $FFFFFFFF
  371. kATSUToTextEnd                    EQU        $FFFFFFFF
  372.  
  373. ; ***************
  374. ;     Functions    
  375. ; ***************
  376.  
  377. ;     Basic style functions    
  378. ;
  379. ; extern OSStatus ATSUCreateStyle(ATSUStyle *oStyle)
  380. ;
  381.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  382.         IMPORT_CFM_FUNCTION ATSUCreateStyle
  383.     ENDIF
  384.  
  385. ;
  386. ; extern OSStatus ATSUCreateAndCopyStyle(ATSUStyle iStyle, ATSUStyle *oStyle)
  387. ;
  388.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  389.         IMPORT_CFM_FUNCTION ATSUCreateAndCopyStyle
  390.     ENDIF
  391.  
  392. ;
  393. ; extern OSStatus ATSUDisposeStyle(ATSUStyle iStyle)
  394. ;
  395.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  396.         IMPORT_CFM_FUNCTION ATSUDisposeStyle
  397.     ENDIF
  398.  
  399. ;
  400. ; extern OSStatus ATSUSetStyleRefCon(ATSUStyle iStyle, UInt32 iRefCon)
  401. ;
  402.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  403.         IMPORT_CFM_FUNCTION ATSUSetStyleRefCon
  404.     ENDIF
  405.  
  406. ;
  407. ; extern OSStatus ATSUGetStyleRefCon(ATSUStyle iStyle, UInt32 *oRefCon)
  408. ;
  409.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  410.         IMPORT_CFM_FUNCTION ATSUGetStyleRefCon
  411.     ENDIF
  412.  
  413.  
  414. ;     Style comparison         
  415. ;
  416. ; extern OSStatus ATSUCompareStyles(ATSUStyle iFirstStyle, ATSUStyle iSecondStyle, ATSUStyleComparison *oComparison)
  417. ;
  418.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  419.         IMPORT_CFM_FUNCTION ATSUCompareStyles
  420.     ENDIF
  421.  
  422. ;     Attribute manipulations    
  423. ;
  424. ; extern OSStatus ATSUCopyAttributes(ATSUStyle iSourceStyle, ATSUStyle iDestinationStyle)
  425. ;
  426.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  427.         IMPORT_CFM_FUNCTION ATSUCopyAttributes
  428.     ENDIF
  429.  
  430. ;
  431. ; extern OSStatus ATSUOverwriteAttributes(ATSUStyle iSourceStyle, ATSUStyle iDestinationStyle)
  432. ;
  433.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  434.         IMPORT_CFM_FUNCTION ATSUOverwriteAttributes
  435.     ENDIF
  436.  
  437. ;
  438. ; extern OSStatus ATSUUnderwriteAttributes(ATSUStyle iSourceStyle, ATSUStyle iDestinationStyle)
  439. ;
  440.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  441.         IMPORT_CFM_FUNCTION ATSUUnderwriteAttributes
  442.     ENDIF
  443.  
  444. ;     Empty styles    
  445. ;
  446. ; extern OSStatus ATSUClearStyle(ATSUStyle iStyle)
  447. ;
  448.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  449.         IMPORT_CFM_FUNCTION ATSUClearStyle
  450.     ENDIF
  451.  
  452. ;
  453. ; extern OSStatus ATSUStyleIsEmpty(ATSUStyle iStyle, Boolean *isClear)
  454. ;
  455.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  456.         IMPORT_CFM_FUNCTION ATSUStyleIsEmpty
  457.     ENDIF
  458.  
  459. ;     Clipboard support    
  460. ;
  461. ; extern OSStatus ATSUCopyToHandle(ATSUStyle iStyle, Handle oStyleHandle)
  462. ;
  463.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  464.         IMPORT_CFM_FUNCTION ATSUCopyToHandle
  465.     ENDIF
  466.  
  467. ;
  468. ; extern OSStatus ATSUPasteFromHandle(ATSUStyle iStyle, Handle iStyleHandle)
  469. ;
  470.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  471.         IMPORT_CFM_FUNCTION ATSUPasteFromHandle
  472.     ENDIF
  473.  
  474. ;     Get and set attributes 
  475. ;
  476. ; extern OSStatus ATSUCalculateBaselineDeltas(ATSUStyle iStyle, BslnBaselineClass iBaselineClass, BslnBaselineRecord oBaselineDeltas)
  477. ;
  478.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  479.         IMPORT_CFM_FUNCTION ATSUCalculateBaselineDeltas
  480.     ENDIF
  481.  
  482. ;
  483. ; extern OSStatus ATSUSetAttributes(ATSUStyle iStyle, ItemCount iAttributeCount, ATSUAttributeTag iTag[2147483647], ByteCount iValueSize[2147483647], ATSUAttributeValuePtr iValue[2147483647])
  484. ;
  485.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  486.         IMPORT_CFM_FUNCTION ATSUSetAttributes
  487.     ENDIF
  488.  
  489. ;
  490. ; extern OSStatus ATSUGetAttribute(ATSUStyle iStyle, ATSUAttributeTag iTag, ByteCount iExpectedValueSize, ATSUAttributeValuePtr oValue, ByteCount *oActualValueSize)
  491. ;
  492.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  493.         IMPORT_CFM_FUNCTION ATSUGetAttribute
  494.     ENDIF
  495.  
  496. ;
  497. ; extern OSStatus ATSUGetAllAttributes(ATSUStyle iStyle, ATSUAttributeInfo oAttributeInfoArray[2147483647], ItemCount iTagValuePairArraySize, ItemCount *oTagValuePairCount)
  498. ;
  499.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  500.         IMPORT_CFM_FUNCTION ATSUGetAllAttributes
  501.     ENDIF
  502.  
  503. ;
  504. ; extern OSStatus ATSUClearAttributes(ATSUStyle iStyle, ItemCount iTagCount, ATSUAttributeTag iTag[2147483647])
  505. ;
  506.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  507.         IMPORT_CFM_FUNCTION ATSUClearAttributes
  508.     ENDIF
  509.  
  510. ;     Font features    
  511. ;
  512. ; extern OSStatus ATSUSetFontFeatures(ATSUStyle iStyle, ItemCount iFeatureCount, ATSUFontFeatureType iType[2147483647], ATSUFontFeatureSelector iSelector[2147483647])
  513. ;
  514.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  515.         IMPORT_CFM_FUNCTION ATSUSetFontFeatures
  516.     ENDIF
  517.  
  518. ;
  519. ; extern OSStatus ATSUGetFontFeature(ATSUStyle iStyle, ItemCount iFeatureIndex, ATSUFontFeatureType *oFeatureType, ATSUFontFeatureSelector *oFeatureSelector)
  520. ;
  521.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  522.         IMPORT_CFM_FUNCTION ATSUGetFontFeature
  523.     ENDIF
  524.  
  525. ;
  526. ; extern OSStatus ATSUGetAllFontFeatures(ATSUStyle iStyle, ItemCount iMaximumFeatureCount, ATSUFontFeatureType *oFeatureType, ATSUFontFeatureSelector *oFeatureSelector, ItemCount *oActualFeatureCount)
  527. ;
  528.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  529.         IMPORT_CFM_FUNCTION ATSUGetAllFontFeatures
  530.     ENDIF
  531.  
  532. ;
  533. ; extern OSStatus ATSUClearFontFeatures(ATSUStyle iStyle, ItemCount iFeatureCount, ATSUFontFeatureType iType[2147483647], ATSUFontFeatureSelector iSelector[2147483647])
  534. ;
  535.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  536.         IMPORT_CFM_FUNCTION ATSUClearFontFeatures
  537.     ENDIF
  538.  
  539. ;     Font variations    
  540. ;
  541. ; extern OSStatus ATSUSetVariations(ATSUStyle iStyle, ItemCount iVariationCount, ATSUFontVariationAxis iAxis[2147483647], ATSUFontVariationValue iValue[2147483647])
  542. ;
  543.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  544.         IMPORT_CFM_FUNCTION ATSUSetVariations
  545.     ENDIF
  546.  
  547. ;
  548. ; extern OSStatus ATSUGetFontVariationValue(ATSUStyle iStyle, ATSUFontVariationAxis iATSUFontVariationAxis, ATSUFontVariationValue *oATSUFontVariationValue)
  549. ;
  550.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  551.         IMPORT_CFM_FUNCTION ATSUGetFontVariationValue
  552.     ENDIF
  553.  
  554. ;
  555. ; extern OSStatus ATSUGetAllFontVariations(ATSUStyle iStyle, ItemCount iVariationCount, ATSUFontVariationAxis oVariationAxes[2147483647], ATSUFontVariationValue oATSUFontVariationValues[2147483647], ItemCount *oActualVariationCount)
  556. ;
  557.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  558.         IMPORT_CFM_FUNCTION ATSUGetAllFontVariations
  559.     ENDIF
  560.  
  561. ;
  562. ; extern OSStatus ATSUClearFontVariations(ATSUStyle iStyle, ItemCount iAxisCount, ATSUFontVariationAxis iAxis[2147483647])
  563. ;
  564.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  565.         IMPORT_CFM_FUNCTION ATSUClearFontVariations
  566.     ENDIF
  567.  
  568. ;     Basic text-layout functions    
  569. ;
  570. ; extern OSStatus ATSUCreateTextLayout(ATSUTextLayout *oTextLayout)
  571. ;
  572.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  573.         IMPORT_CFM_FUNCTION ATSUCreateTextLayout
  574.     ENDIF
  575.  
  576. ;
  577. ; extern OSStatus ATSUCreateTextLayoutWithTextPtr(ConstUniCharArrayPtr iText, UniCharArrayOffset iTextOffset, UniCharCount iTextLength, UniCharCount iTextTotalLength, ItemCount iNumberOfRuns, UniCharCount iRunLengths[2147483647], ATSUStyle iStyles[2147483647], ATSUTextLayout *oTextLayout)
  578. ;
  579.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  580.         IMPORT_CFM_FUNCTION ATSUCreateTextLayoutWithTextPtr
  581.     ENDIF
  582.  
  583. ;
  584. ; extern OSStatus ATSUCreateTextLayoutWithTextHandle(UniCharArrayHandle iText, UniCharArrayOffset iTextOffset, UniCharCount iTextLength, UniCharCount iTextTotalLength, ItemCount iNumberOfRuns, UniCharCount iRunLengths[2147483647], ATSUStyle iStyles[2147483647], ATSUTextLayout *oTextLayout)
  585. ;
  586.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  587.         IMPORT_CFM_FUNCTION ATSUCreateTextLayoutWithTextHandle
  588.     ENDIF
  589.  
  590. ;
  591. ; extern OSStatus ATSUDisposeTextLayout(ATSUTextLayout iTextLayout)
  592. ;
  593.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  594.         IMPORT_CFM_FUNCTION ATSUDisposeTextLayout
  595.     ENDIF
  596.  
  597. ;
  598. ; extern OSStatus ATSUSetTextLayoutRefCon(ATSUTextLayout iTextLayout, UInt32 iRefCon)
  599. ;
  600.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  601.         IMPORT_CFM_FUNCTION ATSUSetTextLayoutRefCon
  602.     ENDIF
  603.  
  604. ;
  605. ; extern OSStatus ATSUGetTextLayoutRefCon(ATSUTextLayout iTextLayout, UInt32 *oRefCon)
  606. ;
  607.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  608.         IMPORT_CFM_FUNCTION ATSUGetTextLayoutRefCon
  609.     ENDIF
  610.  
  611. ;     Text location    
  612. ;
  613. ; extern OSStatus ATSUSetTextPointerLocation(ATSUTextLayout iTextLayout, ConstUniCharArrayPtr iText, UniCharArrayOffset iTextOffset, UniCharCount iTextLength, UniCharCount iTextTotalLength)
  614. ;
  615.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  616.         IMPORT_CFM_FUNCTION ATSUSetTextPointerLocation
  617.     ENDIF
  618.  
  619. ;
  620. ; extern OSStatus ATSUSetTextHandleLocation(ATSUTextLayout iTextLayout, UniCharArrayHandle iText, UniCharArrayOffset iTextOffset, UniCharCount iTextLength, UniCharCount iTextTotalLength)
  621. ;
  622.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  623.         IMPORT_CFM_FUNCTION ATSUSetTextHandleLocation
  624.     ENDIF
  625.  
  626. ;
  627. ; extern OSStatus ATSUGetTextLocation(ATSUTextLayout iTextLayout, void **oText, Boolean *oTextIsStoredInHandle, UniCharArrayOffset *oOffset, UniCharCount *oTextLength, UniCharCount *oTextTotalLength)
  628. ;
  629.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  630.         IMPORT_CFM_FUNCTION ATSUGetTextLocation
  631.     ENDIF
  632.  
  633. ;     Text manipulation    
  634. ;
  635. ; extern OSStatus ATSUTextDeleted(ATSUTextLayout iTextLayout, UniCharArrayOffset iDeletedRangeStart, UniCharCount iDeletedRangeLength)
  636. ;
  637.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  638.         IMPORT_CFM_FUNCTION ATSUTextDeleted
  639.     ENDIF
  640.  
  641. ;
  642. ; extern OSStatus ATSUTextInserted(ATSUTextLayout iTextLayout, UniCharArrayOffset iInsertionLocation, UniCharCount iInsertionLength)
  643. ;
  644.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  645.         IMPORT_CFM_FUNCTION ATSUTextInserted
  646.     ENDIF
  647.  
  648. ;
  649. ; extern OSStatus ATSUTextMoved(ATSUTextLayout iTextLayout, ConstUniCharArrayPtr iNewLocation)
  650. ;
  651.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  652.         IMPORT_CFM_FUNCTION ATSUTextMoved
  653.     ENDIF
  654.  
  655. ;     Layout controls    
  656. ;
  657. ; extern OSStatus ATSUCopyLayoutControls(ATSUTextLayout iSource, ATSUTextLayout iDest)
  658. ;
  659.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  660.         IMPORT_CFM_FUNCTION ATSUCopyLayoutControls
  661.     ENDIF
  662.  
  663. ;
  664. ; extern OSStatus ATSUSetLayoutControls(ATSUTextLayout iLayout, ItemCount iAttributeCount, ATSUAttributeTag iTag[2147483647], ByteCount iValueSize[2147483647], ATSUAttributeValuePtr iValue[2147483647])
  665. ;
  666.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  667.         IMPORT_CFM_FUNCTION ATSUSetLayoutControls
  668.     ENDIF
  669.  
  670. ;
  671. ; extern OSStatus ATSUGetLayoutControl(ATSUTextLayout iLayout, ATSUAttributeTag iTag, ByteCount iExpectedValueSize, ATSUAttributeValuePtr oValue, ByteCount *oActualValueSize)
  672. ;
  673.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  674.         IMPORT_CFM_FUNCTION ATSUGetLayoutControl
  675.     ENDIF
  676.  
  677. ;
  678. ; extern OSStatus ATSUGetAllLayoutControls(ATSUTextLayout iLayout, ATSUAttributeInfo oAttributeInfoArray[2147483647], ItemCount iTagValuePairArraySize, ItemCount *oTagValuePairCount)
  679. ;
  680.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  681.         IMPORT_CFM_FUNCTION ATSUGetAllLayoutControls
  682.     ENDIF
  683.  
  684. ;
  685. ; extern OSStatus ATSUClearLayoutControls(ATSUTextLayout iLayout, ItemCount iTagCount, ATSUAttributeTag iTag[2147483647])
  686. ;
  687.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  688.         IMPORT_CFM_FUNCTION ATSUClearLayoutControls
  689.     ENDIF
  690.  
  691.  
  692.  
  693. ;     Style run processing    
  694. ;
  695. ; extern OSStatus ATSUSetRunStyle(ATSUTextLayout iTextLayout, ATSUStyle iStyle, UniCharArrayOffset iRunStart, UniCharCount iRunLength)
  696. ;
  697.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  698.         IMPORT_CFM_FUNCTION ATSUSetRunStyle
  699.     ENDIF
  700.  
  701. ;
  702. ; extern OSStatus ATSUGetRunStyle(ATSUTextLayout iTextLayout, UniCharArrayOffset iOffset, ATSUStyle *oStyle, UniCharArrayOffset *oRunStart, UniCharCount *oRunLength)
  703. ;
  704.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  705.         IMPORT_CFM_FUNCTION ATSUGetRunStyle
  706.     ENDIF
  707.  
  708. ;
  709. ; extern OSStatus ATSUGetContinuousAttributes(ATSUTextLayout iTextLayout, UniCharArrayOffset iOffset, UniCharCount iLength, ATSUStyle oStyle)
  710. ;
  711.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  712.         IMPORT_CFM_FUNCTION ATSUGetContinuousAttributes
  713.     ENDIF
  714.  
  715. ;     Drawing and measuring    
  716. ;
  717. ; extern OSStatus ATSUDrawText(ATSUTextLayout iTextLayout, UniCharArrayOffset iLineOffset, UniCharCount iLineLength, ATSUTextMeasurement iLocationX, ATSUTextMeasurement iLocationY)
  718. ;
  719.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  720.         IMPORT_CFM_FUNCTION ATSUDrawText
  721.     ENDIF
  722.  
  723. ;
  724. ; extern OSStatus ATSUMeasureText(ATSUTextLayout iTextLayout, UniCharArrayOffset iLineStart, UniCharCount iLineLength, ATSUTextMeasurement *oTextBefore, ATSUTextMeasurement *oTextAfter, ATSUTextMeasurement *oAscent, ATSUTextMeasurement *oDescent)
  725. ;
  726.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  727.         IMPORT_CFM_FUNCTION ATSUMeasureText
  728.     ENDIF
  729.  
  730. ;
  731. ; extern OSStatus ATSUMeasureTextImage(ATSUTextLayout iTextLayout, UniCharArrayOffset iLineOffset, UniCharCount iLineLength, ATSUTextMeasurement iLocationX, ATSUTextMeasurement iLocationY, Rect *oTextImageRect)
  732. ;
  733.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  734.         IMPORT_CFM_FUNCTION ATSUMeasureTextImage
  735.     ENDIF
  736.  
  737. ;     Highlighting    
  738. ;
  739. ; extern OSStatus ATSUHighlightText(ATSUTextLayout iTextLayout, ATSUTextMeasurement iTextBasePointX, ATSUTextMeasurement iTextBasePointY, UniCharArrayOffset iHighlightStart, UniCharCount iHighlightLength)
  740. ;
  741.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  742.         IMPORT_CFM_FUNCTION ATSUHighlightText
  743.     ENDIF
  744.  
  745. ;
  746. ; extern OSStatus ATSUUnhighlightText(ATSUTextLayout iTextLayout, ATSUTextMeasurement iTextBasePointX, ATSUTextMeasurement iTextBasePointY, UniCharArrayOffset iHighlightStart, UniCharCount iHighlightLength)
  747. ;
  748.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  749.         IMPORT_CFM_FUNCTION ATSUUnhighlightText
  750.     ENDIF
  751.  
  752. ;
  753. ; extern OSStatus ATSUGetTextHighlight(ATSUTextLayout iTextLayout, ATSUTextMeasurement iTextBasePointX, ATSUTextMeasurement iTextBasePointY, UniCharArrayOffset iHighlightStart, UniCharCount iHighlightLength, RgnHandle oHighlightRegion)
  754. ;
  755.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  756.         IMPORT_CFM_FUNCTION ATSUGetTextHighlight
  757.     ENDIF
  758.  
  759. ;     Hit-testing    
  760. ;
  761. ; extern OSStatus ATSUPositionToOffset(ATSUTextLayout iTextLayout, ATSUTextMeasurement iLocationX, ATSUTextMeasurement iLocationY, UniCharArrayOffset *ioPrimaryOffset, Boolean *oIsLeading, UniCharArrayOffset *oSecondaryOffset)
  762. ;
  763.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  764.         IMPORT_CFM_FUNCTION ATSUPositionToOffset
  765.     ENDIF
  766.  
  767. ;
  768. ; extern OSStatus ATSUOffsetToPosition(ATSUTextLayout iTextLayout, UniCharArrayOffset iOffset, Boolean iIsLeading, ATSUCaret *oMainCaret, ATSUCaret *oSecondCaret, Boolean *oCaretIsSplit)
  769. ;
  770.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  771.         IMPORT_CFM_FUNCTION ATSUOffsetToPosition
  772.     ENDIF
  773.  
  774. ;     Cursor movement    
  775. ;
  776. ; extern OSStatus ATSUNextCursorPosition(ATSUTextLayout iTextLayout, UniCharArrayOffset iOldOffset, ATSUCursorMovementType iMovementType, UniCharArrayOffset *oNewOffset)
  777. ;
  778.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  779.         IMPORT_CFM_FUNCTION ATSUNextCursorPosition
  780.     ENDIF
  781.  
  782. ;
  783. ; extern OSStatus ATSUPreviousCursorPosition(ATSUTextLayout iTextLayout, UniCharArrayOffset iOldOffset, ATSUCursorMovementType iMovementType, UniCharArrayOffset *oNewOffset)
  784. ;
  785.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  786.         IMPORT_CFM_FUNCTION ATSUPreviousCursorPosition
  787.     ENDIF
  788.  
  789. ;
  790. ; extern OSStatus ATSURightwardCursorPosition(ATSUTextLayout iTextLayout, UniCharArrayOffset iOldOffset, ATSUCursorMovementType iMovementType, UniCharArrayOffset *oNewOffset)
  791. ;
  792.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  793.         IMPORT_CFM_FUNCTION ATSURightwardCursorPosition
  794.     ENDIF
  795.  
  796. ;
  797. ; extern OSStatus ATSULeftwardCursorPosition(ATSUTextLayout iTextLayout, UniCharArrayOffset iOldOffset, ATSUCursorMovementType iMovementType, UniCharArrayOffset *oNewOffset)
  798. ;
  799.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  800.         IMPORT_CFM_FUNCTION ATSULeftwardCursorPosition
  801.     ENDIF
  802.  
  803. ;     Line breaking    
  804. ;
  805. ; extern OSStatus ATSUBreakLine(ATSUTextLayout iTextLayout, UniCharArrayOffset iLineStart, ATSUTextMeasurement iLineWidth, Boolean iUseAsSoftLineBreak, UniCharArrayOffset *oLineBreak)
  806. ;
  807.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  808.         IMPORT_CFM_FUNCTION ATSUBreakLine
  809.     ENDIF
  810.  
  811. ;
  812. ; extern OSStatus ATSUSetSoftLineBreak(ATSUTextLayout iTextLayout, UniCharArrayOffset iLineBreak)
  813. ;
  814.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  815.         IMPORT_CFM_FUNCTION ATSUSetSoftLineBreak
  816.     ENDIF
  817.  
  818. ;
  819. ; extern OSStatus ATSUGetSoftLineBreaks(ATSUTextLayout iTextLayout, UniCharArrayOffset iRangeStart, UniCharCount iRangeLength, ItemCount iMaximumBreaks, UniCharArrayOffset oBreaks[2147483647], ItemCount *oBreakCount)
  820. ;
  821.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  822.         IMPORT_CFM_FUNCTION ATSUGetSoftLineBreaks
  823.     ENDIF
  824.  
  825. ;
  826. ; extern OSStatus ATSUClearSoftLineBreaks(ATSUTextLayout iTextLayout, UniCharArrayOffset iRangeStart, UniCharCount iRangeLength)
  827. ;
  828.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  829.         IMPORT_CFM_FUNCTION ATSUClearSoftLineBreaks
  830.     ENDIF
  831.  
  832. ;     Idle processing    
  833. ;
  834. ; extern OSStatus ATSUIdle(ATSUTextLayout iTextLayout)
  835. ;
  836.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  837.         IMPORT_CFM_FUNCTION ATSUIdle
  838.     ENDIF
  839.  
  840. ;     Font matching    
  841. ;
  842. ; extern OSStatus ATSUMatchFontsToText(ATSUTextLayout iTextLayout, UniCharArrayOffset iTextStart, UniCharCount iTextLength, ATSUFontID *oFont, UniCharArrayOffset *oChangedOffset, UniCharCount *oChangedLength)
  843. ;
  844.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  845.         IMPORT_CFM_FUNCTION ATSUMatchFontsToText
  846.     ENDIF
  847.  
  848. ;
  849. ; extern OSStatus ATSUSetTransientFontMatching(ATSUTextLayout iTextLayout, Boolean iTransientFontMatching)
  850. ;
  851.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  852.         IMPORT_CFM_FUNCTION ATSUSetTransientFontMatching
  853.     ENDIF
  854.  
  855. ;
  856. ; extern OSStatus ATSUGetTransientFontMatching(ATSUTextLayout iTextLayout, Boolean *oTransientFontMatching)
  857. ;
  858.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  859.         IMPORT_CFM_FUNCTION ATSUGetTransientFontMatching
  860.     ENDIF
  861.  
  862. ;     Font ID's    
  863. ;
  864. ; extern OSStatus ATSUFontCount(ItemCount *oFontCount)
  865. ;
  866.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  867.         IMPORT_CFM_FUNCTION ATSUFontCount
  868.     ENDIF
  869.  
  870. ;
  871. ; extern OSStatus ATSUGetFontIDs(ATSUFontID oFontIDs[2147483647], ItemCount iArraySize, ItemCount *oFontCount)
  872. ;
  873.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  874.         IMPORT_CFM_FUNCTION ATSUGetFontIDs
  875.     ENDIF
  876.  
  877. ;
  878. ; extern OSStatus ATSUFONDtoFontID(short iFONDNumber, Style iFONDStyle, ATSUFontID *oFontID)
  879. ;
  880.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  881.         IMPORT_CFM_FUNCTION ATSUFONDtoFontID
  882.     ENDIF
  883.  
  884. ;
  885. ; extern OSStatus ATSUFontIDtoFOND(ATSUFontID iFontID, short *oFONDNumber, Style *oFONDStyle)
  886. ;
  887.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  888.         IMPORT_CFM_FUNCTION ATSUFontIDtoFOND
  889.     ENDIF
  890.  
  891. ;     Font names    
  892. ;
  893. ; extern OSStatus ATSUCountFontNames(ATSUFontID iFontID, ItemCount *oFontNameCount)
  894. ;
  895.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  896.         IMPORT_CFM_FUNCTION ATSUCountFontNames
  897.     ENDIF
  898.  
  899. ;
  900. ; extern OSStatus ATSUGetIndFontName(ATSUFontID iFontID, ItemCount iFontNameIndex, ByteCount iMaximumNameLength, Ptr oName, ByteCount *oActualNameLength, FontNameCode *oFontNameCode, FontPlatformCode *oFontNamePlatform, FontScriptCode *oFontNameScript, FontLanguageCode *oFontNameLenguage)
  901. ;
  902.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  903.         IMPORT_CFM_FUNCTION ATSUGetIndFontName
  904.     ENDIF
  905.  
  906. ;
  907. ; extern OSStatus ATSUFindFontName(ATSUFontID iFontID, FontNameCode iFontNameCode, FontPlatformCode iFontNamePlatform, FontScriptCode iFontNameScript, FontLanguageCode iFontNameLanguage, ByteCount iMaximumNameLength, Ptr oName, ByteCount *oActualNameLength, ItemCount *oFontNameIndex)
  908. ;
  909.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  910.         IMPORT_CFM_FUNCTION ATSUFindFontName
  911.     ENDIF
  912.  
  913. ;
  914. ; extern OSStatus ATSUFindFontFromName(Ptr iName, ByteCount iNameLength, FontNameCode iFontNameCode, FontPlatformCode iFontNamePlatform, FontScriptCode iFontNameScript, FontLanguageCode iFontNameLanguage, ATSUFontID *oFontID)
  915. ;
  916.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  917.         IMPORT_CFM_FUNCTION ATSUFindFontFromName
  918.     ENDIF
  919.  
  920. ;     Font features    
  921. ;
  922. ; extern OSStatus ATSUCountFontFeatureTypes(ATSUFontID iFont, ItemCount *oTypeCount)
  923. ;
  924.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  925.         IMPORT_CFM_FUNCTION ATSUCountFontFeatureTypes
  926.     ENDIF
  927.  
  928. ;
  929. ; extern OSStatus ATSUCountFontFeatureSelectors(ATSUFontID iFont, ATSUFontFeatureType iType, ItemCount *oSelectorCount)
  930. ;
  931.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  932.         IMPORT_CFM_FUNCTION ATSUCountFontFeatureSelectors
  933.     ENDIF
  934.  
  935. ;
  936. ; extern OSStatus ATSUGetFontFeatureTypes(ATSUFontID iFont, ItemCount iMaximumTypes, ATSUFontFeatureType oTypes[2147483647], ItemCount *oActualTypeCount)
  937. ;
  938.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  939.         IMPORT_CFM_FUNCTION ATSUGetFontFeatureTypes
  940.     ENDIF
  941.  
  942. ;
  943. ; extern OSStatus ATSUGetFontFeatureSelectors(ATSUFontID iFont, ATSUFontFeatureType iType, ItemCount iMaximumSelectors, ATSUFontFeatureSelector oSelectors[2147483647], Boolean oSelectorIsOnByDefault[2147483647], ItemCount *oActualSelectorCount, Boolean *oIsMutuallyExclusive)
  944. ;
  945.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  946.         IMPORT_CFM_FUNCTION ATSUGetFontFeatureSelectors
  947.     ENDIF
  948.  
  949. ;
  950. ; extern OSStatus ATSUGetFontFeatureNameCode(ATSUFontID iFont, ATSUFontFeatureType iType, ATSUFontFeatureSelector iSelector, FontNameCode *oNameCode)
  951. ;
  952.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  953.         IMPORT_CFM_FUNCTION ATSUGetFontFeatureNameCode
  954.     ENDIF
  955.  
  956. ;     Font variations    
  957. ;
  958. ; extern OSStatus ATSUCountFontVariations(ATSUFontID iFont, ItemCount *oVariationCount)
  959. ;
  960.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  961.         IMPORT_CFM_FUNCTION ATSUCountFontVariations
  962.     ENDIF
  963.  
  964. ;
  965. ; extern OSStatus ATSUGetIndFontVariation(ATSUFontID iFont, ItemCount iVariationIndex, ATSUFontVariationAxis *oATSUFontVariationAxis, ATSUFontVariationValue *oMinimumValue, ATSUFontVariationValue *oMaximumValue, ATSUFontVariationValue *oDefaultValue)
  966. ;
  967.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  968.         IMPORT_CFM_FUNCTION ATSUGetIndFontVariation
  969.     ENDIF
  970.  
  971. ;
  972. ; extern OSStatus ATSUGetFontVariationNameCode(ATSUFontID iFont, ATSUFontVariationAxis iAxis, FontNameCode *oNameCode)
  973. ;
  974.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  975.         IMPORT_CFM_FUNCTION ATSUGetFontVariationNameCode
  976.     ENDIF
  977.  
  978.  
  979. ;     Font Instances    
  980. ;
  981. ; extern OSStatus ATSUCountFontInstances(ATSUFontID iFont, ItemCount *oInstances)
  982. ;
  983.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  984.         IMPORT_CFM_FUNCTION ATSUCountFontInstances
  985.     ENDIF
  986.  
  987. ;
  988. ; extern OSStatus ATSUGetFontInstance(ATSUFontID iFont, ItemCount iFontInstanceIndex, ItemCount iMaximumVariations, ATSUFontVariationAxis oAxes[2147483647], ATSUFontVariationValue oValues[2147483647], ItemCount *oActualVariationCount)
  989. ;
  990.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  991.         IMPORT_CFM_FUNCTION ATSUGetFontInstance
  992.     ENDIF
  993.  
  994. ;
  995. ; extern OSStatus ATSUGetFontInstanceNameCode(ATSUFontID iFont, ItemCount iInstanceIndex, FontNameCode *oNameCode)
  996. ;
  997.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  998.         IMPORT_CFM_FUNCTION ATSUGetFontInstanceNameCode
  999.     ENDIF
  1000.  
  1001.     ENDIF ; __ATSUNICODE__ 
  1002.  
  1003.